package com.servicebuck.database.entity;
// Generated Aug 30, 2011 11:09:02 PM by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Payment generated by hbm2java
 */
@Entity
@Table(name="payment"
    ,catalog="telluricng"
)
public class Payment  implements java.io.Serializable {


     private long paymentId;
     private Paymentstatus paymentstatus;
     private Integer inactive;
     private String currencyType;
     private Date dueDate;
     private Short totalDue;
     private Set<Cost> costs = new HashSet<Cost>(0);

    public Payment() {
    }

	
    public Payment(long paymentId, Paymentstatus paymentstatus) {
        this.paymentId = paymentId;
        this.paymentstatus = paymentstatus;
    }
    public Payment(long paymentId, Paymentstatus paymentstatus, Integer inactive, String currencyType, Date dueDate, Short totalDue, Set<Cost> costs) {
       this.paymentId = paymentId;
       this.paymentstatus = paymentstatus;
       this.inactive = inactive;
       this.currencyType = currencyType;
       this.dueDate = dueDate;
       this.totalDue = totalDue;
       this.costs = costs;
    }
   
     @Id 

    
    @Column(name="payment_id", unique=true, nullable=false)
    public long getPaymentId() {
        return this.paymentId;
    }
    
    public void setPaymentId(long paymentId) {
        this.paymentId = paymentId;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="status", nullable=false)
    public Paymentstatus getPaymentstatus() {
        return this.paymentstatus;
    }
    
    public void setPaymentstatus(Paymentstatus paymentstatus) {
        this.paymentstatus = paymentstatus;
    }

    
    @Column(name="inactive")
    public Integer getInactive() {
        return this.inactive;
    }
    
    public void setInactive(Integer inactive) {
        this.inactive = inactive;
    }

    
    @Column(name="currency_type", length=4)
    public String getCurrencyType() {
        return this.currencyType;
    }
    
    public void setCurrencyType(String currencyType) {
        this.currencyType = currencyType;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="due_date", length=19)
    public Date getDueDate() {
        return this.dueDate;
    }
    
    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    
    @Column(name="total_due", precision=4, scale=0)
    public Short getTotalDue() {
        return this.totalDue;
    }
    
    public void setTotalDue(Short totalDue) {
        this.totalDue = totalDue;
    }

@ManyToMany(fetch=FetchType.LAZY, mappedBy="payments")
    public Set<Cost> getCosts() {
        return this.costs;
    }
    
    public void setCosts(Set<Cost> costs) {
        this.costs = costs;
    }




}


